package com.ibiaoke.customer.service;

import com.ibiaoke.common.base.Page;
import com.ibiaoke.customer.entity.Customer;
import com.ibiaoke.customer.entity.PtOpenGroup;
import org.omg.PortableInterceptor.INACTIVE;

import java.util.List;

public interface OpenGroupService {

    //保存开团订单
    PtOpenGroup savePtOpenGroup(PtOpenGroup ptOpenGroup);

    List<PtOpenGroup> openGroupList(Integer ptGoodsId, Page page);

    //通过id，获取开团订单
    List<PtOpenGroup> getPtOpenGroup(Integer id);

    PtOpenGroup getPtOpenGroupById(Integer id);

    //根据开团id，获取开团
    PtOpenGroup getPtOpenGroupByKid(Integer kid);

    //更改拼团人数
    Integer updatePtOpenGroupCount(Integer kid,Integer num);

    //更改金额和支付类型
    Integer updatePayTypeAndPayMoney(Integer id,Integer payType,Double payMoney);

    PtOpenGroup checkPtOpenGroup(Integer customerId, Integer ptGoodsId, Integer kid);

    //更新openGroup状态
    Integer updateOpenGroupStatus(Integer id,Integer status);

    //删除订单
    Integer deleteOpenGroup(Integer kid,Integer isDelete);

    PtOpenGroup checkPtOpenGroupIsOk(Integer kid);


    PtOpenGroup getPtOpenGroupByOpenCode(Integer kid);

    PtOpenGroup getPtOpenGroupByOpenCodeAndUserIdAndPtGoodsId(String openCode, Customer customer, Integer ptGoodsId);

    List<PtOpenGroup> getPtOpenGroupByOpenCodeAndPtGoodsId(String openCode, Integer ptGoodsId);

    PtOpenGroup checkOpenGroup(String openCode, Integer goodsId, Integer customerId);

    List<PtOpenGroup> getPtOpenGroupListByOpenCode(String openCode);

    Integer updateIsPay(Integer Kid,Integer status);

    List<PtOpenGroup> bossOpenGroupList(Integer ptGoodsId, Page page);

    List<PtOpenGroup> listOpenGroupByOpenCode(String openCode, Page page);
}
